// Header File
// Created 12/2/2007; 12:14:26 AM

#ifndef __SEARCH_H__
#define __SEARCH_H__

#include "Globals.h"

typedef struct
{
	int x, y;
	int parent;
	int dist_trav;
	int dist_left;
} Square;

typedef struct
{
	Square *root;
	int size;
	int numb;
} SqQueue;

void resize_o();
void resize_c();
int insert_o(Square sq);
int insert_c(Square sq);
void remove_pos(int sq);
int find_pos_o(int pos);
int find_pos_c(int pos);
int find_min_dis();

void addToQueue(int x, int y, int parent, int dist_trav);
int getPath(int x1, int y1, int x2, int y2, int *x3, int *y3, int civ);
int _getPath(int x1, int y1, int x2, int y2, int *x3, int *y3, int civ, int maxDist);

#endif // __SEARCH_H__
